<template>
  <dk-table
    ref="DkTableRef"
    table-api="/adminapi/platform.wechat.transfer"
    :query="{ plaid: getPlaid() }"
    :hide-buttons="['recycle', 'add']"
    :cache-table="!getDev()"
  >
    <template #addons_solt="{ row }">
      <span v-if="row.fAddon" title="首次访问的应用" class="u-m-r-5">
        <img :src="row.fAddon.icon" width="24" alt="" style="border-radius: 10px" />
      </span>
      <span v-if="row.lAddon" title="最后访问的应用">
        <img :src="row.lAddon.icon" width="24" alt="" style="border-radius: 10px" />
      </span>
    </template>
    <template #topUser_solt="{ row }">
      <div v-if="scope.row.topUser">
        <el-avatar :src="scope.row.topUser.avatar" />
        <p class="over">{{ scope.row.topUser.nickname }}</p>
      </div>
      <el-tag v-else>无</el-tag>
    </template>
  </dk-table>
</template>
<script setup lang="ts">
import { ref } from 'vue'

// 自动判断开发模式启用缓存
// @ts-ignore
import { getDev } from '@/utils/auth'
// @ts-ignore
import handleClipboard from '@/utils/clipboard'
import { ElMessage } from 'element-plus'
import { getPlaid } from '@/composables/useSystem'
defineOptions({
  name: 'WechatUser'
})
const DkTableRef = ref()
const DkFormRef = ref()
const handleAdd = () => {
  DkFormRef.value.show()
}
const submit = (data: any) => {
  console.log(data)
  DkTableRef.value.DkTable.getIndex()
}
</script>
<style lang="scss" scoped></style>
